//
//  PhotosetInfo.m
//  iFlickr
//
//  Created by 张 霄鹤 on 09-7-3.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "PhotosetInfo.h"


@implementation PhotosetInfo

@synthesize setID;
@synthesize primary;
@synthesize secret;
@synthesize serverID;
@synthesize farmID;
@synthesize title;
@synthesize description;
@synthesize photos;
@synthesize url;

/**
 * 通过属性字段设置内容
 */
- (void)setProperties:(NSDictionary *)attribs{
	if(attribs){
		NSString *str = nil;
		str = [attribs objectForKey:@"id"];
		if(str){
			self.setID = str;
		}
		str = [attribs objectForKey:@"primary"];
		if(str){
			self.primary = str;
		}
	
		str = [attribs objectForKey:@"secret"];
		if(str){
			self.secret = str;
		}
	
		str = [attribs objectForKey:@"server"];
		if(str){
			self.serverID = str;
		}
	
		str = [attribs objectForKey:@"photos"];
		if(str){
			self.photos = [str intValue];
		}
	
		str = [attribs objectForKey:@"farm"];
		if(str){
			self.farmID = str;
		}
	
		str = [attribs objectForKey:@"url"];
		if(str){
			self.url = str;
		}
	
		str = [attribs objectForKey:@"title"];
		if(str){
			self.title = str;
		}
	
		str = [attribs objectForKey:@"description"];
		if(str){
			self.description = str;
		}
	}
}

@end
